$.fn.popup=function(options){
    var defaults={
        content:'',//弹出框的内容
        type:'',//弹出框的类型
        conBtn:'',//确定按钮
        canBtn:'',//取消框按钮
        width:'200px',//提示框宽度
        height:'200px',//提示框高度
        conFun:"",
        canFun:""
    };
    var settings=$.extend(defaults,options);
    //创建遮罩层
    function createMask(){
        var html='<div class="mask"></div>';
        return html;
    }
    function conFun() {
        eval(settings.conFun);
    }
    function canFun() {
        eval(settings.canFun);
    }
    //创建提示框
    function  createDialog() {
        var html = '<div class="popup_dialog_box" style="width: ' + settings.width + '">';
        html += '<div class="popup_dialog"  style="height: ' + settings.height + ';width: ' + settings.width + '"><div class="dialog_tip">' + settings.content + '</div>';
        //创建按钮
        if (settings.conBtn != '' && settings.conBtn != null) {
            html += '<button onclick="'+settings.conFun+'" class="popup_con_btn popup_btn">' + settings.conBtn + '</button>';
        }
        if (settings.canBtn != '' && settings.canBtn != null) {
            html += '<button onclick="'+settings.canFun+'" class="popup_can_btn popup_btn">' + settings.canBtn + '</button>';
        }
        html += '</div></div>';
        return html;
    }
    var html=createMask()+createDialog();
    this.append(html);
}